//路由对象  需要用到  VueRouter 来创建
import VueRouter from 'vue-router'
  
/* 导入路由组件 */
import Home from './components/tabbar/HomeContainer.vue'
import Member from './components/tabbar/MemberContainer.vue'
import Shopcar from './components/tabbar/ShopcarContainer.vue'
import Search from './components/tabbar/SearchContainer.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import Photolist from './components/photos/photoList.vue'
import PhotoInfo from './components/photos/photoInfo.vue'
import GoodList from './components/goods/GoodList.vue'
import GoodInfo from './components/goods/GoodInfo.vue'
//创建路由对象
var router = new VueRouter({
  routes: [
    {   path: '/', component: Home  },
    {   path: '/home', component: Home  },
    {   path: '/member',  component: Member},
    {   path: '/shopcar', component: Shopcar},
    {   path: '/search',component: Search },
    {   path: '/home/newslist',component: NewsList },
    {   path: '/home/newsinfo/:id',component: NewsInfo },
    {   path: '/home/photolist',component: Photolist },
    {   path: '/home/photoInfo/:id',component: PhotoInfo },
    {   path: '/home/goodslist',component: GoodList },
    {   path: '/home/goodsinfo/:id',component: GoodInfo , name:"goodsinfo"},
  ],
  linkActiveClass: 'mui-active'//mui-active 是mui给我们提供的高亮类，覆盖默认的路由高亮的类，默认的类叫做 router-link-active
})
// 使用 export default 将router 暴露出去
export default router
